home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / global.h.z / global.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.9 KB  |  143 lines

  1. /* $Id: global.h,v 1.14 1999/02/23 11:42:53 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_GLOBAL_H__
  25. #define __GLIBTOP_GLOBAL_H__
  26.  
  27. #ifdef _IN_LIBGTOP
  28. #include <config.h>
  29. #endif
  30.  
  31. /*
  32.  * All declarations are enclosed in BEGIN_LIBGTOP_DECLS and
  33.  * END_LIBGTOP_DECLS so that C++ compilers don't mangle their names.
  34.  *
  35.  */
  36.    
  37. #undef BEGIN_LIBGTOP_DECLS
  38. #undef END_LIBGTOP_DECLS
  39. #ifdef __cplusplus
  40. # define BEGIN_LIBGTOP_DECLS extern "C" {
  41. # define END_LIBGTOP_DECLS }
  42. #else
  43. # define BEGIN_LIBGTOP_DECLS /* empty */
  44. # define END_LIBGTOP_DECLS /* empty */
  45. #endif
  46.  
  47. #ifdef _IN_LIBGTOP
  48.  
  49. /* Provide macros to feature the GCC function attribute.
  50.  */
  51. #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
  52. #define G_GNUC_NORETURN                \
  53.   __attribute__((noreturn))
  54. #define G_GNUC_CONST                \
  55.   __attribute__((const))
  56. #define G_GNUC_UNUSED                \
  57.   __attribute__((unused))
  58. #else    /* !__GNUC__ */
  59. #define G_GNUC_NORETURN
  60. #define G_GNUC_CONST
  61. #define    G_GNUC_UNUSED
  62. #endif    /* !__GNUC__ */
  63.  
  64. #endif /* _IN_LIBGTOP */
  65.  
  66. #if TIME_WITH_SYS_TIME
  67. # include <sys/time.h>
  68. # include <time.h>
  69. #else
  70. # if HAVE_SYS_TIME_H
  71. #  include <sys/time.h>
  72. # else
  73. #  include <time.h>
  74. # endif
  75. #endif
  76.  
  77. #ifdef NEED_GNOMESUPPORT_H
  78. #include <gnomesupport.h>
  79. #endif
  80.  
  81. #ifdef WITHOUT_GUILE
  82. #undef GLIBTOP_GUILE
  83. #undef GLIBTOP_GUILE_NAMES
  84. #endif
  85.  
  86. #ifdef GLIBTOP_GUILE
  87. #include <guile/gh.h>
  88. #endif
  89.  
  90. #ifdef _IN_LIBGTOP
  91. #if (defined HAVE_LIBINTL_H) || (defined HAVE_GETTEXT)
  92. #include <libintl.h>
  93. #else
  94. #include <libgettext.h>
  95. #endif
  96. #endif
  97.  
  98. #include <stdio.h>
  99. #include <stdlib.h>
  100.  
  101. #include <stdarg.h>
  102.  
  103. #ifdef HAVE_UNISTD_H
  104. #include <unistd.h>
  105. #endif
  106.  
  107. #ifdef HAVE_MEMORY_H
  108. #include <memory.h>
  109. #endif
  110.  
  111. #include <string.h>
  112.  
  113. #ifdef _IN_LIBGTOP
  114.  
  115. #include <sys/types.h>
  116. #include <sys/param.h>
  117. #include <sys/socket.h>
  118. #include <sys/stat.h>
  119.  
  120. #endif /* _IN_LIBGTOP */
  121.  
  122. #include <signal.h>
  123. #include <errno.h>
  124.  
  125. #ifdef _IN_LIBGTOP
  126.  
  127. BEGIN_LIBGTOP_DECLS
  128.  
  129. #ifndef _
  130. #define _(String) dgettext (PACKAGE, String)
  131. #define N_(String) (String)
  132. #endif
  133.  
  134. #ifndef HAVE_STRERROR
  135. char *strerror (int errno);
  136. #endif
  137.  
  138. END_LIBGTOP_DECLS
  139.  
  140. #endif /* _IN_LIBGTOP */
  141.  
  142. #endif
  143.